import { request } from '@umijs/max';

// 获取所有类型
export const getTypesApi = ()=>{
    return request('/api/type')
}

// 新增类型
export const addNewTypeApi = (data)=>{
    return request('/api/type',{
        method:'POST',
        data:{...data}
    })
}

export const deleteTypeApi = (id)=>{
    return request(`/api/type/${id}`,{
        method:'DELETE'
    })
}